package com.genius.system.bo;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.hibernate.validator.constraints.Length;

import javax.validation.constraints.Min;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;

@Data
@ApiModel(value = "修改菜单BO", description = "从客户端，由用户传入的数据封装在此entity中")
public class UpdateMenuBO {
    @NotNull(message = "菜单ID不能为空")
    @ApiModelProperty(value = "菜单ID")
    private Long menuId;

    @NotBlank(message = "菜单名称不能为空")
    @ApiModelProperty("菜单名称")
    private String menuName;

    @ApiModelProperty("父菜单id")
    private Long parentId;

    @ApiModelProperty("路由地址")
    private String path;

    @ApiModelProperty("组件路径")
    private String component;

    @ApiModelProperty("是否为外链（1是 0否）")
    private String isFrame;

    @NotBlank(message = "菜单类型不能为空")
    @ApiModelProperty("菜单类型（M目录 C菜单 F按钮）")
    private String menuType;

    @NotNull(message = "菜单状态不能为空")
    @ApiModelProperty("菜单状态（1显示 0隐藏）")
    private Integer status;

    @NotBlank(message = "权限标识不能为空")
    @ApiModelProperty("权限标识")
    private String permission;

    @Length(max = 20,message = "菜单图标不能超过20个字符")
    @ApiModelProperty("菜单图标")
    private String icon;

    @NotNull(message = "显示顺序不能为空")
    @Min(value = 0, message = "显示顺序不能小于0")
    @ApiModelProperty("显示顺序")
    private Integer orderNum;

    @ApiModelProperty("备注")
    private String remark;
}
